﻿@model IEnumerable<MvcApplication2.Models.UserMessage>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_DevLayout.cshtml";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Index", new { @class = "btn btn-action" })
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Title)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Type)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.OwnerId)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.PrivateThread)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ParentMessageId)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Exercise.Status)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Currency)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Reward)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Type)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.OwnerId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.PrivateThread)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ParentMessageId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Exercise.Status)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Currency)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Reward)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.UserMessageId }) |
            @Html.ActionLink("Details", "Details", new { id=item.UserMessageId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.UserMessageId })
        </td>
    </tr>
}

</table>
